import { Loading } from 'element-ui'

export function startLoading () {
  const loading = Loading.service({
    lock: true,
    text: '加载中...',
    spinner: 'el-icon-loading',
    background: 'rgba(0, 0, 0, 0.7)'
  })

  return loading
}

export function stopLoading (loading) {
  loading.close()
}
